import http from '@/utils/http'

export const addressDefault = () => {
	const url = 'api/address/default'
	return http.get(url)
}

export const addressList = (params) => {
	const url = 'api/address/list'
	return http.get(url, { params })
}

export const cityList = () => {
	const url = 'api/city_list'
	return http.get(url)
}

export const addressEdit = (params) => {
	const url = 'api/address/edit'
	return http.post(url, params)
}

export const addressDelete = (params) => {
	const url = 'api/address/del'
	return http.post(url, params)
}

export const addressDetail = (id) => {
	const url = `api/address/detail/${id}`
	return http.get(url)
}
